'''
Author: LHY 2601958675@qq.com
Date: 2023-06-27 16:16:19
LastEditors: LHY
LastEditTime: 2023-06-27 16:20:21
Description: 
'''
import scrapy

class DmozSpider(scrapy.spiders.Spider):
    name = "dmoz"
    allowed_domains = ["dmoz.org"]
    start_urls = [
        "https://study.bailiedu.com/online/geek/",
        "https://github.com/lyswhut/lx-music-desktop/releases"
    ]

    def parse(self, response):
        filename = response.url.split("/")[-2]
        with open(filename, 'wb') as f:
            f.write(response.body)